import { ActiveBaseIcon } from "../activity/icon/ActiveBaseIcon";
import { LayerManager } from "../../manager/LayerManager";
import { FilterConst } from "../../../component/gconst/FilterConst";
import { EffectManager } from "../../manager/EffectManager";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { EventName } from "../../mvc/EventName";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
type int = number;
//class WrestleIcon
    
    export  class WrestleIcon extends ActiveBaseIcon
    {
        constructor()
        {
            super();
            this.buttonMode = true;
            this.layer = LayerManager.rightTopUILayer;
            this.init();
            return;
        }

        public /* override */ show(arg1: int=0, arg2: int=0): void
        {
            this.iconIsFlash = true;
            var loc1=[FilterConst.topIconFlashFilter];
            EffectManager.glowFilterReg(this, loc1, 0.8, 10, 5, 0);
            super.show(arg1, arg2);
            return;
        }

        public /* override */ hide(): void
        {
            this.hideIconFlash();
            super.hide();
            return;
        }

        /* internal  */init(): void
        {
            this._button = ObjCreate.createGLoadedButton(ResFileConst.ArenaIcon, 0, 0, 60, 50, this);
            this.addEventListener(flash.events.MouseEvent.CLICK, this.showWrestleTipsHandler);
            return;
        }

        /* internal  */showWrestleTipsHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            this.hideIconFlash();
            Dispatcher.dispatchEvent(new Object /* flash.events.Event */(EventName.showWrestleDetailPanel));
            return;
        }

        /* internal  */hideIconFlash(): void
        {
            if (this.iconIsFlash) 
            {
                EffectManager.glowFilterUnReg(this);
                this.iconIsFlash = false;
            }
            return;
        }

        /* internal */ /* var */_button: GLoadedButton;

        /* internal */ /* var */iconIsFlash: Boolean;
    }
